

	var content = document.getElementById('content');
    var direcc = document.getElementById('direcc');
    
	function agregarUser(){
		wave.getState().submitDelta({'agregarContacto': direcc.value});
	}    
    

    function stateUpdated() {
      if(!wave.getState().get('agregarContacto')) {
        content.innerHTML = ""
      }
      else {
		content.innerHTML = wave.getState().get('agregarContacto');
      } 
    }
 
    function init() {
      if ((wave) && (wave.isInWaveContainer())) {
          wave.setStateCallback(stateUpdated);
      }
    }
    gadgets.util.registerOnLoadHandler(init);